while and do …. while
Pascal           C/C++
   while x < y do
     x := 2 * x
   while (x < y)
     x = 2 * x;
   repeat
     x := 2 * x;
     y := y – 1
   until x >= y
   do {
     y = 2 * x;
     y--;
} while (x < y);
   NOTE: The sense of the condition is the opposite from
Pascal.